package com.sheep.Pattern.Singleton.lazyMan;

/**
 * 懒汉式
 * 用的时候才创建实例
 * 缺点:线程不安全 不怎么用
 * @author yangyangSheep
 */
public class LazyMan {
    private static LazyMan lazyMan;
    private LazyMan(){}
    public static LazyMan getInstance(){
        if(lazyMan == null){
            lazyMan = new LazyMan();
        }
        return lazyMan;
    }
}
